package cn.itsy.web.controller;

import cn.itsy.pojo.ResultPojo;
import cn.itsy.service.warninfo.WarnInfoService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

/**
 * @description:
 * @author: MisterGay
 * @date: 2019-06-04 10:48
 */
@Controller
@RequestMapping("warnInfo")
public class WarnInfoController {
    @Resource(name = "warnInfoServiceimpl")
    private WarnInfoService warnInfoService;

    @RequestMapping("insertWarnInfo")
    @ResponseBody
    public void insertWarnInfo(ResultPojo resultPojo) {
        System.out.println(resultPojo);
        String sql = "insert into warninfo values(?,?,?,?,?,?,?,?)";
        this.warnInfoService.insertWarnInfo(sql, resultPojo);
    }
}
